package dataconfig

import (
	"encoding/json"
	"gitee.com/jmdvirus/jkgo/jk/jklog"
	"io/ioutil"
)

type CmdDataList struct {
	Cmd  string `json:"cmd"`
	Args string `json:"args"`
}

func CmdDataListGet() CmdDataList {
	cd := CmdDataList{}
	d, err := ioutil.ReadFile("etc/cmddatalist.json")
	if err != nil {
		jklog.L().Errorln("error: ", err)
		return cd
	}
	json.Unmarshal(d, &cd)
	return cd
}
